<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>clone.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<script type="text/javascript" src="jquery-1.6.js"></script>
	<script type="text/javascript">

	var myfunction;
	function bind(){
		$("button:first").attr("disabled","disabled");
		$("img").bind("click",myfunction=function(){
			$("p").append("给img");
		});
	}

	function unbind(){
		$("button:first").attr("disabled","");
		$("img").unbind("click",myfunction);
	}

	function sh(){
		//$("img").hide();
		$("img").fadeOut(3000);
	}
	function sh1(){
		//$("img").show();
		$("img").slideToggle(3000);
	}
	function cl(){	
	var s=$("img").clone();

	s.appendTo($("#clone"));
	}

	</script>
  </head>
  
  <body>
   	<img alt="" src="200.jpg" width="100" height="100">
   	<hr/>
   	<p></p>
   	
   	<button onclick="bind()">监听</button>
   	<button onclick="sh();"></button>
   	<button onclick="sh1();"></button>
   	<button onclick="cl();">克隆</button>
   	<button onclick="unbind()">移出监听</button>
   	
   	<div id="clone"></div>
  </body>
</html>
